$NG.AllReady(function (page, { useValuesChange }) {

    //获取控件
    var form = $NG.getCmpApi("p_form_equipment_list_split");
    var grid = $NG.getCmpApi("p_form_equipment_split_d");

    //表体增行时设置默认值，当表头u_split_rate变化时，更新所有明细数据
    useValuesChange(({ args }) => {
        console.log('useValuesChange is reayd');
        console.log(args[0]);
        var u_split_rate = $NG.getCmpApi("p_form_equipment_list_split").getItem("u_split_rate").getValue()
        var grid = $NG.getCmpApi("p_form_equipment_split_d");
        // 获取表体数据
        var data = grid.getData(); // 假设这个方法能获取到表体数据
        console.log(data);
        // 遍历数据并设置 u_split_rate 为 1
        data.forEach(function (item) {
            item.u_split_rate = u_split_rate; // 设置 u_split_rate 为 1

        });
        grid.updateRow(data)
    }, "p_form_equipment_list_split.u_split_rate");
});

